const getService = params => {
  const { href } = window.location;

  const isMobile = /\/m/.test(href);

  // eslint-disable-next-line no-underscore-dangle
  const service = isMobile ? window.__MOBILE_SERVICE__ : window.__PC_SERVICE__;
  if (params) {
    return service(params);
  }
  return service;
};
export default getService;
